package org.lookahead.parent.apidoc.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 试题能力
 *
 * @author Lookahead
 * @since 2021-07-02
 */
@Getter
@AllArgsConstructor
public enum QAbility {

    ABILITY_HEAR("听", 1),
    ABILITY_SAY("说", 2),
    ABILITY_READ("读", 3),
    ABILITY_WRITE("写", 4),
    ABILITY_SEE("看", 5),
    ;

    final String name;
    final int value;

    public static String getNameByKey(int key) {
        switch (key) {
            case 1:
                return ABILITY_HEAR.name;
            case 2:
                return ABILITY_SAY.name;
            case 3:
                return ABILITY_READ.name;
            case 4:
                return ABILITY_WRITE.name;
            case 5:
                return ABILITY_SEE.name;
            default:
                return "";
        }
    }
}
